<?php
session_start ();

if (! isset ( $_SESSION ['id'] )) {
	echo "<table class='principale'><tr><td>Session expired</td></tr>";
	echo "<tr><td><a href='" . $_SESSION ['pathway'] . "/index.php'>Start</a></td></tr></table>";
} else {
	
	$_SESSION ['pathway'] = '.';
	$_SESSION ['pathway_js'] = '';
	$_SESSION ['authentification'] = '1';
	require_once ("./requetes/last_login.php");
	require_once ("./commun/ouvre_base.php");
	include ("./header.php");
	
	if (isset ( $_GET ['delete'] )) {
		$_SESSION ['delete'] = $_GET ['delete'];
		require_once ("./fichespataxeurospa/requetes/no_save.php");
		unset ( $_SESSION ['delete'] );
	}
	
	if (isset ( $_GET ['from'] ) and $_GET ['from'] == 'fiche_activite') {
		require_once ("./fichespataxeurospa/requetes/remplissage_fiche_activite.php");
	}
	
	?><a href='./index.php'>Home</a><?php
	
	require_once ("./requetes/recup_niveau.php");
	
	?><table class='principale'>
	<tr></tr>
	<tr>
		<td><h1>Data Entry</h1></td>
	</tr><?php
	
	if ($_SESSION ['acces_clinique'] >= 2) {
		?><tr>
		<td><img src="./images/clinique.jpg" height='20' width='20'> Clinics :
			<br />
			<p style='margin-left: 5em; margin-top: 0.5em;'>
				<a href="#"
					onclick="surdecreernouveauformulaire('<?php echo $_SESSION['pathway']; ?>')"
					value='new form'>new diagnosis form </a> <br /> <a
					href="./fichespataxeurospa/fiche_activite.php"> new activity record	form </a>
			</p></td>
	</tr><?php
	} else {
		?><tr>
		<td><img src="./images/clinique.jpg" height='20' width='20'>Clinics :
			<noncliquable> new form </noncliquable></td>
	</tr><?php
	}
	if ($_SESSION ['acces_genetique'] >= 2) {
		?><tr>
		<td><img src="./images/genetique.jpg" height='20' width='20'><a
			href="./genetiquespataxeurospa/index.php"> Genetics </a></td>
	</tr><?php
	} else {
		?><tr>
		<td><img src="./images/genetique.jpg" height='20' width='20'>
		<noncliquable> Genetics </noncliquable></td>
	</tr><?php
	}
	
	?><tr>
		<td><br />
		<br />
		<h1>Data Export</h1></td>
	</tr>
	<?php
	if ($_SESSION ['acces_clinique'] >= 1) {
		?><tr>
		<td><img src="./images/clinique.jpg" height='20' width='20'><a
			href="./fichespataxeurospa/choix.php"> Clinics </a></td>
	</tr><?php
	} else {
		?><tr>
		<td><img src="./images/clinique.jpg" height='20' width='20'>
		<noncliquable> Clinics </noncliquable></td>
	</tr><?php
	}
	if ($_SESSION ['acces_genetique'] >= 1) {
		?><tr>
		<td><img src="./images/genetique.jpg" height='20' width='20'><a
			href="./genetiquespataxeurospa/consultation.php"> Genetics </a></td>
	</tr><?php
	} else {
		?><tr>
		<td><img src="./images/genetique.jpg" height='20' width='20'>
		<noncliquable> Genetics </noncliquable></td>
	</tr><?php
	}

	
	?>
	</table><?php

}
?>
